#include <iostream>
#include <string>

using namespace std;

class stu
{
private:
    string name;
    int id;
public:
    stu(){}
    
    //通过括号法
    stu(string m_name , int m_id)
    {
        name = m_name;
        id =m_id;
    }

public:
    void show()
    {
        cout << "姓名" << name << endl;
        cout << "学号" << id << endl;
    }

};


int main(int argc, char const *argv[])
{

    stu s1("唐三",10);
    s1.show();

    stu s2(s1);
    s2.show();

    stu s3 = stu("萧炎", 12);
    s3.show();

    
    return 0;
}
